import java.util.Scanner;

/**
 * @author : niu niu
 * @version : 1.0.0
 * @date : 2022/10/19 10:08
 * //另类加法
 * //走方格的方案数
 */
public class Day9 {
     //走方格的方案数
     public static void main(String[] args) {
         Scanner sc = new Scanner(System.in);
         int n = sc.nextInt();
         int m = sc.nextInt();
         System.out.println(solution(n,m));
     }
     public static int solution(int n,int m){
         if(n==1||m==1){
             return n+m;
         }
         return solution(n-1,m)+solution(n,m-1);
     }
    //另类加法
    public static void main2(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int A = scanner.nextInt();
        int B = scanner.nextInt();
        int addBit = 0;
        do {
            addBit = A & B;
            A = A ^ B ;
            B = addBit << 1;
        }while (B != 0);

        System.out.println(A);
    }
    private static void testMethod(){
        System.out.println("testMethod");
    }
    public static void main1(String[] args) {
        int i = 0;
        Integer j = new Integer(0);
        System.out.println(i==j);
        System.out.println(j.equals(i));

        ((Day9)null).testMethod();
    }
}
